﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="UserList.aspx.cs" Inherits="Admin.Admin.UserMan.UserList" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="../css/common.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <div style="margin-top: 8px;">
        <asp:GridView ID="Users" runat="server" Width="100%" CellPadding="3" BorderWidth="1px"
            BorderStyle="Solid" AutoGenerateColumns="false" Height="100%" AllowPaging="True"  OnPageIndexChanging="UserList_PageIndexChanging">
            <Columns>
                <asp:BoundField DataField="UserID" HeaderText="用户编号" ItemStyle-HorizontalAlign="Center" />
                <asp:BoundField DataField="Account" HeaderText="用户帐号" ItemStyle-HorizontalAlign="Center" />
                <asp:BoundField DataField="Password" HeaderText="用户密码" ItemStyle-HorizontalAlign="Center" />
                <asp:BoundField DataField="NickName" HeaderText="用户昵称" ItemStyle-HorizontalAlign="Center" />
                <asp:BoundField DataField="QQ" HeaderText="QQ" ItemStyle-HorizontalAlign="Center" />
                <asp:BoundField DataField="RegTime" HeaderText="注册时间" SortExpression="Password" ItemStyle-HorizontalAlign="Center" />
                <asp:BoundField DataField="LoginTimes" HeaderText="登录次数" ItemStyle-HorizontalAlign="Center" />

                <asp:TemplateField HeaderText="是否可用">
                    <ItemTemplate>
                        <asp:DropDownList ID="IsAvailable" userid='<%#Eval("UserID") %>' runat="server" AutoPostBack="True" 
                            onselectedindexchanged="IsAvailable_SelectedIndexChanged" 
                            SelectedValue='<%# Eval("IsAvailable").ToString() %>'>
                            <asp:ListItem Value="1">可用</asp:ListItem>
                            <asp:ListItem Value="0">不可用</asp:ListItem>
                        </asp:DropDownList>
                    </ItemTemplate>
                </asp:TemplateField>

            </Columns>
            <AlternatingRowStyle CssClass="GV_AlterRowCss" />
            <RowStyle CssClass="GV_RowCss" />
            <HeaderStyle CssClass="GV_AlterRowCss" />
            <EmptyDataTemplate>
                暂无数据</EmptyDataTemplate>
            <PagerSettings Mode="Numeric" />
        </asp:GridView>
    </div>
    </form>
</body>
</html>
